
//
//  UILabel+Extension.swift
//  Weibo
//
//  Created by 李学林 on 15/12/10.
//  Copyright © 2015年 tete. All rights reserved.
//

import UIKit

extension UILabel{
    
    convenience init(textColor: UIColor , textSize: CGFloat , maxWidth:CGFloat = 0){
        self.init()
        
        self.textColor = textColor
        self.font = UIFont.systemFontOfSize(textSize)
        
        if maxWidth > 0 {
        
            numberOfLines = 0
            preferredMaxLayoutWidth = maxWidth
        }
        
    }

}
